package com.imageim.yimirror.ui.activity;

import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.imageim.yimirror.R;
import com.imageim.yimirror.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Yuaihen.
 * on 2018/6/13
 * 免责声明页面
 */
public class DisclaimerActivity extends BaseActivity {
    @BindView(R.id.btn_close)
    Button mBtnClose;
    @BindView(R.id.rl_root)
    RelativeLayout mRlRoot;
    @BindView(R.id.webView)
    WebView mWebView;

    @Override
    protected void initBundle() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_disclaimer;
    }

    @Override
    protected void initView() {
        ButterKnife.bind(this);
    }

    @Override
    protected void initData() {
        mWebView.getSettings().setSupportZoom(true);
        mWebView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
        mWebView.getSettings().setLoadWithOverviewMode(true);
        mWebView.loadUrl("file:///android_asset/disclaimer.html");
    }


    @OnClick({R.id.btn_close, R.id.rl_root})
    public void onViewClicked(View view) {
        if (view.getId() == R.id.btn_close) {
            finish();
        } else {
            finish();
        }
    }

}
